package club.xyes.pi4j.util;

/**
 * 2018/11/6 Create by 郭文梁
 * RadixUtil
 * 进制工具
 *
 * @author 郭文梁
 * @date 2018/11/6
 */
public class RadixUtil {
    private static final int HEX = 16;

    /**
     * 从十六进制字符串创建int
     *
     * @param hex 字符串
     * @return int
     */
    public static int fromHex(String hex) {
        return Integer.parseInt(hex, HEX);
    }
}
